﻿using PmSoft;
using PmSoft.Entity;

namespace ManagementApi.Mvc
{
    /// <summary>
    /// 权限验证器
    /// </summary>
    public interface IAuthorizer
    {
        /// <summary>
        /// 验证当前登录用户是否拥有权限
        /// </summary>
        /// <param name="permissionKey"></param>
        /// <returns></returns>
        bool Authorize(string permissionKey);
        /// <summary>
        /// 验证当前登录用户是否拥有权限
        /// </summary>
        /// <param name="permissionKey"></param>
        /// <param name="user"></param>
        /// <returns></returns>
        bool Authorize(string permissionKey, IUser user);
        /// <summary>
        /// permissionKeys
        /// </summary>
        /// <param name="permissionKeys"></param>
        /// <returns></returns>
        bool Authorize(params string[] permissionKeys);

      
    }
}